A simple question about canvas

Hi, all

I encountered a problem in developing my application with Doors8.2.

I created a new column, named it "Test", its attribute is "Layout DXL", input the code as follows:
 

void btn(DBE canv, int bt, bool ctrl, int x, int y)
{
    if(bt == 1)
        print "Left clicked"
    else if(bt == 2)
        print "Left double clicked"
    else 
        print "Right clicked"
}
 
DBE canv
canv = getCanvas
set(canv, btn)

 


There is no errors when checking these codes, however, they can't execute correctly, error message are as follows:

An unexcepted error had occured: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in module doors.exe at 001B:0096D5B1

The final line, set(canv, btn) is the place where the error occured.

It abused me much, Looking for everyone's reply.

Sincerely, Aven

 


Aven_HIT - Thu Dec 24 02:30:14 EST 2009

Re: A simple question about canvas
Aven_HIT - Fri Dec 25 01:29:51 EST 2009

Hi, all

Merry christmas!

It's very urgent for me to slove this problem.

Please give me some hints or tips if you could, many thanks.

Best regards, Aven.

Re: A simple question about canvas
Mathias Mamsch - Fri Dec 25 01:49:08 EST 2009

Hi Aven,

it is not possible to use the mouseEvent or the keyboardEvent callbacks on a canvas of a layout DXL. The canvas obtained from a Layout DXL is not a real canvas! I think you can only use it to draw on it.

Regards, Mathias